<template>
  <div class="wrapper flex-h flex-hw">
    <div
      class="flex-v flex-vc entry-cell-entry"
      v-for="(item,index) in dataList"
      v-bind:key="index"
      @click="jump(item.url)"
    >
      <img :src="item.icon" />
      <span>{{item.name}}</span>
    </div>
  </div>
</template>

<script>
import { open } from '@/utils/JumpUtils.js'
export default {
  data() {
    return {
      dataList: []
    }
  },
  mounted() {
    this.dataList.push({ icon: require('../assets/wallet.png'), name: '钱包', url: 'module=city-app&page=wallet&needLogin=true' })
    this.dataList.push({ icon: require('../assets/coupon.png'), name: '优惠券', url: 'module=city-app&page=coupon&needLogin=true' })
    this.dataList.push({ icon: require('../assets/focus.png'), name: '关注', url: 'module=city-app&page=focus&needLogin=true' })
    this.dataList.push({ icon: require('../assets/fav.png'), name: '收藏', url: 'module=shop-app&page=collection&needLogin=true' })
    this.dataList.push({ icon: require('../assets/task.png'), name: '任务单', url: 'module=city-app&page=tasklist&needLogin=true' })
    this.dataList.push({ icon: require('../assets/price.png'), name: '询价单', url: 'module=city-app&page=tasklist&needLogin=true' })
  },
  methods: {
    jump: function (url) {
      open(url)
    }
  }
}
</script>

<style scoped>
.wrapper {
  width: 750px;
  height: 400px;
  background: #fff;
}

.entry-cell-entry {
  width: 180px;
  height: 180px;
  color: #000;
}

.entry-cell-entry > img {
  height: 80px;
  width: 80px;
  margin-top: 50px;
}
.entry-cell-entry > span {
  font-size: 11px; /*no*/
  line-height: 15px; /*no*/
  color: #333;
  margin-top: 18px;
}
</style>
